package com.itheima.a05oppextendsdemo5;

public class Test {
    public static void main(String[] args) {
        //1.创建对象
        Manager m = new Manager("001","张三",5000,10000);
        System.out.println(m.getId());
        System.out.println(m.getName());
        System.out.println(m.getSalary());
        //2.调用方法
        m.work();
        m.eat();
        m.setBonus(10000);
        System.out.println(m.getBonus());
        //3.创建子类对象
        Cook c = new Cook("002","李四",3000);
        c.work();
        c.eat();
    }
}
